From: Xiaofeng Wang Date: Tue, 31 Mar 2026 03:39:04 +0000 (+0800) Subject: ci: Sync Rust linting checks from bootc-dev/bootc X-Git-Tag: archive/raspbian/2026.2-1+rpi1~1^2~10^2^2~4^2~4 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=f46bb02a591d62331c3cd6b2c268080c3698b78d;p=ostree.git ci: Sync Rust linting checks from bootc-dev/bootc Align with bootc's validate target: - Make cargo clippy gating (was "non-gating") with the same lint config as bootc (-A clippy::all -D clippy::correctness -D clippy::suspicious -Dunused_imports -Ddead_code) - Extend clippy to cover test crates (tests/inst, tests/bootc-integration, tests/xtask) - Add cargo doc with -D warnings to catch rustdoc issues Co-Authored-By: Claude Opus 4.6 Signed-off-by: Xiaofeng Wang --- diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 1e768863..5f8b8bf0 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -33,8 +33,15 @@ jobs: run: cargo build --verbose --features=${{ env['CARGO_PROJECT_FEATURES'] }} - name: Run tests run: cargo test --verbose --features=${{ env['CARGO_PROJECT_FEATURES'] }} - - name: cargo clippy (non-gating) - run: cargo clippy -p ostree --features=${{ env['CARGO_PROJECT_FEATURES'] }} + - name: cargo clippy + run: | + CLIPPY_CONFIG="-A clippy::all -D clippy::correctness -D clippy::suspicious -Dunused_imports -Ddead_code" + cargo clippy -p ostree --features=${{ env['CARGO_PROJECT_FEATURES'] }} -- $CLIPPY_CONFIG + for d in tests/inst tests/bootc-integration tests/xtask; do + cargo clippy --manifest-path $d/Cargo.toml -- $CLIPPY_CONFIG + done + - name: cargo doc + run: env RUSTDOCFLAGS='-D warnings' cargo doc --lib -p ostree --features=${{ env['CARGO_PROJECT_FEATURES'] }} build-no-features: runs-on: ubuntu-latest container: quay.io/coreos-assembler/fcos-buildroot:testing-devel